//
//  TREmptyViewController.m
//  WeiMiLan
//
//  Created by Mac on 15/9/17.
//  Copyright (c) 2015年 Mac. All rights reserved.
//

#import "TREmptyViewController.h"

@interface TREmptyViewController ()

@end

@implementation TREmptyViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    UILabel *label = [[UILabel alloc]init];
   
    label.size = CGSizeMake(200, 25);
    label.textAlignment = NSTextAlignmentCenter;
    label.center = self.view.center;
    label.text = @"暂无内容";
    
    [self.view addSubview:label];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self initNavigation];
    
}

- (void)setNavTitle:(NSString *)navTitle {
    _navTitle = navTitle;
    
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:YES];
    self.weChatNavigationBar.titleLabel.text=self.navTitle;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)initNavigation
{
    [self.navigationController setNavigationBarHidden:YES animated:YES];
    self.weChatNavigationBar=[[WeChatNavigationBar alloc] init];
    self.weChatNavigationBar.height = 64;
    [self.view addSubview:self.weChatNavigationBar];
    //  self.weChatNavigationBar.titleLabel.text=@"搜索";
    //  [self.weChatNavigationBar.leftButton setBackgroundImage:@"" forState:UIControlStateNormal];
    
    [self.weChatNavigationBar.leftButton addTarget:self action:@selector(exit) forControlEvents:UIControlEventTouchUpInside];
    // [self.weChatNavigationBar.contentViews addSubview:segmented2];
    self.weChatNavigationBar.rightButton.hidden = YES;
    
}
-(void)exit
{
    [self dismissViewControllerAnimated:YES completion:nil];
    // [self dismissViewControllerAnimated:YES completion:nil];
}

@end
